<template>
	<view class="message flex-a-center" :class="{'success':isSuccess===1}" v-if="isSuccess!=2">
		<text class="iconfont">&#xe606;</text>
		<text>{{message}}</text>
	</view>
	<view class="message-more message flex-a-center" v-else-if="isSuccess==2">
		<text>
			本次共识别出 <text class="total-txt">{{num.total}}</text> 张发票，其中 <text class="success-txt">{{num.success}}</text>
			张成功，<text class="error-txt">{{num.error}}</text> 张失败
		</text>
	</view>
</template>

<script setup>
	const props = defineProps({
		message: String,
		isSuccess: Number,
		num: Object
	})
</script>

<style lang="scss" scoped>
	.message {
		height: 64rpx;
		background: #FFEEEE;
		font-weight: 400;
		font-size: 28rpx;
		color: #F5222D;
		padding: 0 24rpx;

		.iconfont {
			color: #FF525B;
			font-size: 32rpx;
			margin-right: 12rpx;
		}

	}

	.success {
		background: #E7F7DE;
		color: #4DB315;

		.iconfont {
			color: #4DB315
		}
	}

	.message-more {
		background: #E9F0FE;
		color: #333333;

		.total-txt {
			color: #296DFA
		}

		.success-txt {
			color: #4DB315
		}

		.error-txt {
			color: #F5222D
		}
	}
</style>